/**
 * 
 */
package com.agilegroup.crm.requests;

import com.agilegroup.crm.model.CalendarData;
import com.octo.android.robospice.request.springandroid.SpringAndroidSpiceRequest;

/**
 * @author hisham
 *
 */
public class CalendarJsonRequest extends SpringAndroidSpiceRequest<CalendarData>{

	private String eventType;
	private String empId;
	private String url;
	public CalendarJsonRequest(String eventType,String empId,String url) {
		super(CalendarData.class);
		this.eventType=eventType;
		this.empId=empId;
		this.url=url;
	}
	
	@Override
	public CalendarData loadDataFromNetwork() throws Exception {
		return getRestTemplate().getForObject(url+eventType+"/"+empId+".json", CalendarData.class);
	}
}
